var timer;
Page({
 data:{
   num:3
 },
 onLoad(){
   this.reduceNum()
 },
 reduceNum(){
   timer = setTimeout(() => {
    var num = this.data.num;
    num--;
    if(num>=0){
      this.setData({
        num
      })
      this.reduceNum()
    }else{
      wx.switchTab({
        url: '/pages/music/music',
      })
    }
   }, 1000);
 },
 handleClick(){
   clearTimeout(timer)
   wx.switchTab({
     url: '/pages/music/music',
   })
 }
})
